﻿<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Blazing.BusinessObjects.eCommerce" namespace="Blazing.BusinessObjects.Products" >
  <class name="Product" table="products" dynamic-insert="true" dynamic-update="true">

    <id name="ID" column="productid" type="Int32">
      <generator class="native" />
    </id>
    <timestamp column="rowstamp" name="RowStamp" />

    <property name="Name" length="100" not-null="true" />
    <property name="ProductCode" length="100" unique="true" />
    <property name="Description" length="1000" />
    <property name="PriceNett" type="Decimal" />
    <property name="Price" type="Decimal" />
    <property name="HasInventory" type="Boolean" />
    <property name="InStock" type="Int32" />
    <property name="StockDate" type="DateTime" />
    <property name="Active" type="Boolean" />

    <set name="TaxonomyTags" table="producttaxonomytags">
      <key column="productid"/>
      <many-to-many class="Blazing.BusinessObjects.Tagging.TaxonomyTag, Blazing.BusinessObjects" column="taxonomytagid"/>
    </set>

  </class>
</hibernate-mapping>